package com.plum.admin.modules.youeorder.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import com.plum.admin.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * <p>
 * 订单信息表
 * </p>
 *
 * @author 子丶沫
 * @since 2021-08-17
 */
@Data
@Accessors(chain = true)
@TableName("sn_order_info")
@ApiModel(value="SnOrderInfo对象", description="订单信息表")
@ToString
public class SnOrderInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    private String id;

    @ApiModelProperty(value = "原订单id 只有改派过的订单才有此id")
    @TableField("old_order_id")
    private Integer oldOrderId;


    @ApiModelProperty(value = "删除标识:0-正常，1-删除")
    @TableField("del_flag")
    private Integer delFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_date")
    private LocalDateTime updateDate;

    @ApiModelProperty(value = "备注信息")
    @TableField("remarks")
    private String remarks;


    @ApiModelProperty(value = "订单编号")
    @TableField("orderNo")
    private String orderno;

    @ApiModelProperty(value = "用车时间")
    @TableField("order_time")
    private LocalDateTime orderTime;

    @ApiModelProperty(value = "用户id")
    @TableField("userId")
    private Integer userid;

    @ApiModelProperty(value = "乘客联系电话")
    @TableField("passengerTel")
    private String passengertel;

    @ApiModelProperty(value = "乘客名称")
    @TableField("passengerName")
    private String passengername;

    @ApiModelProperty(value = "司机Id，如果该笔订单已被司机接单，该字段为对应的司机Id")
    @TableField("driverId")
    private Integer driverid;

    @TableField(exist = false)
    private Driver driver;

    @ApiModelProperty(value = "预估订单金额，不包含优惠券，元 为单位")
    @TableField("estimateAmt")
    private BigDecimal estimateamt;

    @ApiModelProperty(value = "司机端金额")
    @TableField("driverAmt")
    private BigDecimal driveramt;

    @ApiModelProperty(value = "行程费")
    @TableField("order_fee")
    private BigDecimal orderFee;

    @ApiModelProperty(value = "行程费副本 只做展示 不修改")
    @TableField("order_fee_copy")
    private String orderFeeCopy;

    @ApiModelProperty(value = "支付时间")
    @TableField("pay_time")
    private LocalDateTime payTime;

    @ApiModelProperty(value = "实际支付金额 元 为单位")
    @TableField("actualAmt")
    private BigDecimal actualamt;

    @ApiModelProperty(value = "实际支付金额副本 只做展示 不修改")
    @TableField("actualAmt_copy")
    private BigDecimal actualamtCopy;

    @ApiModelProperty(value = "订单类型，1-自己下单，2-替别人叫车")
    @TableField("orderType")
    private Integer ordertype;

    @ApiModelProperty(value = "订单模式，1-实时 2-预约")
    @TableField("orderModel")
    private Integer ordermodel;

    @ApiModelProperty(value = "运力类型 0-经济型 1-优享型 2-舒适型 3-商务型 4-豪华型 5-出租车 6-特惠")
    @TableField("rideType")
    private String ridetype;

    @ApiModelProperty(value = "实际运力类型")
    @TableField("actRideType")
    private String actridetype;

    @ApiModelProperty(value = "确认费用")
    @TableField("confirmAmt")
    private String confirmamt;

    @ApiModelProperty(value = "预估里程，单位千米")
    @TableField("distance")
    private String distance;

    @ApiModelProperty(value = "实际里程，单位千米")
    @TableField("actualDistance")
    private String actualdistance;

    @ApiModelProperty(value = "派到车时间")
    @TableField("findCarTime")
    private LocalDateTime findcartime;

    @ApiModelProperty(value = "去接乘客时间")
    @TableField("go_bus_time")
    private LocalDateTime goBusTime;

    @ApiModelProperty(value = "到达上车点时间")
    @TableField("goUpTime")
    private LocalDateTime gouptime;

    @ApiModelProperty(value = "接到乘客时间")
    @TableField("pickTime")
    private LocalDateTime picktime;

    @ApiModelProperty(value = "到达目的地时间")
    @TableField("arriveTime")
    private LocalDateTime arrivetime;

    @ApiModelProperty(value = "确认收款时间")
    @TableField("confirmTime")
    private LocalDateTime confirmtime;

    @ApiModelProperty(value = "待付款提醒时间")
    @TableField("remindTime")
    private LocalDateTime remindtime;

    @ApiModelProperty(value = "下单时经度")
    @TableField("lon")
    private String lon;

    @ApiModelProperty(value = "下单时纬度")
    @TableField("lat")
    private String lat;

    @ApiModelProperty(value = "城市编码")
    @TableField("cityCode")
    private String citycode;

    @ApiModelProperty(value = "区号")
    @TableField("areaCode")
    private String areacode;

    @ApiModelProperty(value = "是否已经提交开发票申请0-否，1-是")
    @TableField("isInvoiced")
    private Integer isinvoiced;

    @ApiModelProperty(value = "取消原因")
    @TableField("cancelReason")
    private String cancelreason;

    @ApiModelProperty(value = "0正常  1逻辑删除")
    @TableField("deleteFlag")
    private Integer deleteflag;

    @ApiModelProperty(value = "用户优惠券id")
    @TableField("optimalFeeId")
    private Integer optimalfeeid;

    @ApiModelProperty(value = "优惠金额")
    @TableField("yhMoney")
    private BigDecimal yhmoney;

    @ApiModelProperty(value = "替他人叫车是否发送短信标志0否1是")
    @TableField("sendMsgFlag")
    private Integer sendmsgflag;

    @ApiModelProperty(value = "起步价")
    @TableField("startPrice")
    private BigDecimal startprice;

    @ApiModelProperty(value = "超出里程价格")
    @TableField("perPrice")
    private BigDecimal perprice;

    @ApiModelProperty(value = "司机是否接单 0:未接单 1:接单 -1初始化")
    @TableField("receiveOrder")
    private Integer receiveorder;

    @ApiModelProperty(value = "策略id")
    @TableField("strategy_id")
    private String strategyId;

    @ApiModelProperty(value = "支付订单ID")
    @TableField("payorderid")
    private String payorderid;

    @ApiModelProperty(value = "轨迹id")
    @TableField("trid")
    private Integer trid;

    @ApiModelProperty(value = "派单距离")
    @TableField("dispatchDistance")
    private Double dispatchdistance;

    @ApiModelProperty(value = "预估到达上车点时长，单位秒")
    @TableField("dispatchDuration")
    private Integer dispatchduration;

    @ApiModelProperty(value = "订单来源 0-App预约 1-微信小程序 2-司机  3-管理后台")
    @TableField("order_from_type")
    private Integer orderFromType;

    @ApiModelProperty(value = "取消类型 0 乘客取消 1 管理后台取消 2-司机取消 3-超时自动取消 4-乘客有责取消")
    @TableField("cancelType")
    private Integer canceltype;

    @ApiModelProperty(value = "取消时间")
    @TableField("cancelTime")
    private LocalDateTime canceltime;

    @ApiModelProperty(value = "留言标签")
    @TableField("cy_leave_word_id")
    private String cyLeaveWordId;

    @ApiModelProperty(value = "留言内容")
    @TableField("leave_word")
    private String leaveWord;

    @ApiModelProperty(value = "旧派单类型：管理后台指派	新派单类型 0:系统派单;1:后台指派;2:扫码下单")
    @TableField("orderSetType")
    private Integer ordersettype;

    @ApiModelProperty(value = "平台来源  0-自有平台 1-滴滴 2-携程")
    @TableField("platform")
    private Integer platform;

    @ApiModelProperty(value = "取消token")
    @TableField("cancelToken")
    private String canceltoken;

    @ApiModelProperty(value = "第三方订单id")
    @TableField("open_oid")
    private String openOid;

    @ApiModelProperty(value = "第三方用户id")
    @TableField("open_pid")
    private String openPid;

    @ApiModelProperty(value = "0=正常派单 1=抢单确认")
    @TableField("grab_status")
    private Integer grabStatus;

    @ApiModelProperty(value = "携程服务类型：10:普通立即用车;11:普通预约用车;31:接火车;32:送火车")
//    @TableField("serviceType")
    @TableField(exist = false)
    private Integer servicetype;

    @ApiModelProperty(value = "携程计价模式0:普通计价")
//    @TableField("priceMode")
    @TableField(exist = false)
    private Integer pricemode;

    @ApiModelProperty(value = "司机端类型 0=ue , 1=eo")
    @TableField("termType")
    private Integer termtype;

    @ApiModelProperty(value = "注：预留字段现在没用到，以后会用到。支付方式 0-微信支付 1-支付宝 2-银联支付 3-司机代付")
    @TableField("pay_type")
    private Integer payType;

    @ApiModelProperty(value = "改派类型 1自动改派 2手动改派 只有存在改派记录的新老订单才有值")
    @TableField("change_type")
    private Integer changeType;

    @TableField(exist = false)
    public String otherPrice;
}
